using System;
using System.Collections.Generic;
using DecisionMaking.BusinessLogic.Model;
using DecisionMaking.Domain;
using DecisionMaking.Domain.Reports;

namespace DecisionMaking.BusinessLogic.Impl
{
    public class ReportManager : IReportManager
    {
        private readonly ReportDao _reportDao = new ReportDao();

        public IList<CompetitionResultReportEntry> GetAverageProportionOfCorrectInferences(ReportModel model)
        {
            return _reportDao.GetAverageProportionOfCorrectInferences(model.DefinitionId, model.EnvironmentId, model.SimulationId);
        }

        public IList<AlgorithmPerformanceReportEntry> GetSingleAlgorithmPerformance(ReportModel model)
        {
            return _reportDao.GetSingleAlgorithmPerfomance(model.DefinitionId.GetValueOrDefault(), model.EnvironmentId, model.SimulationId);
        }

        public IList<AlgorithmPerformanceReportEntry> GetAllAlgorithmsPerformance(ReportModel model)
        {
            return _reportDao.GetAlgorithmPerfomance(model.EnvironmentId, model.SimulationId);
        }
    }
}